/*
 * Sample 2
 * This source file contains an example program written in SALSA!
 */

;; f :: int -> int
(define (f n)
  (do (+ 2 3)            ; This value is neglected
      (* 3 4)            ; also this one, because
      3                  ; the value of a do expression
      (let (r (* n 2))   ; is the value of the last exp (this one in this example)
        (case ((= r 0) n)
              ((> r 10) r)
              (else (* r 3))))))

(f 6) ; Calling f with 6

 


